<template>
  <div>
    这是首页
    <br>
    <button @click="replace"> replace </button>
    <br>
    <button @click="goDetail">goDetail</button>
  </div>
</template>

<script>
export default {
  name: 'Index',
  methods: {
    replace () {
      this.$router.replace('/login')
    },
    goDetail () {
      this.$router.push({ name: 'Detail', params: { id: '05' } })
    }
  },
}
</script>
